# 多态

class Dog():
    def __init__(self):
        pass

    # 父类提供统一的方法,哪怕是空方法
    def work(self):
        print('指哪打哪')
        pass

    pass


class ArmyDog(Dog):
    def __init__(self):
        pass

    def work(self):
        print('这个是探查敌人用的狗 ')
        pass

    pass


class DrugDog(Dog):
    def __init__(self):
        pass

    def work(self):
        print('这个是毒品用的狗')
        pass

    pass


class Person():
    def work_with_dog(self, dog):
        dog.work()
        pass
    pass
dog=ArmyDog()
# dog=DrugDog()
person=Person()
person.work_with_dog(dog)
